From bbb847aef7cc84406829867beb56b572db826feb Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 13 Mar 2008 00:27:46 +0000 Subject: [PATCH] Skip the cursor past the autocompleted part when requesting explicit completion Signed-off-by: Federico Mena Quintero svn path=/trunk/; revision=19802 --- gtk/gtkfilechooserentry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index a6c6629640..c94bf88ea8 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -785,7 +785,14 @@ gtk_file_chooser_entry_focus (GtkWidget *widget, { gint pos = 0; - if (!chooser_entry->has_completion) + if (chooser_entry->has_completion) + { + gint sel_end; + + if (gtk_editable_get_selection_bounds (editable, NULL, &sel_end)) + gtk_editable_set_position (editable, sel_end); + } + else append_common_prefix (chooser_entry, FALSE); /* Trigger the completion window to pop up again by a -- 2.30.2